package Package.Recursion.Test1;

import java.io.File;

public class Test_one {
    public static  void Test_one(){
//遍历目录
        File f=new File("D:\\");
        getAllForPath(f);
    }
    public static  void getAllForPath(File f){
        File[] files = f.listFiles();
       if (files!=null){
           for (File file:files
             ) {
              if (file.isDirectory()){
                  getAllForPath(file);
              }else {
                  System.out.println(file);
              }
           }
       }
    }
}
